FROM adoptopenjdk/openjdk8:jre8u-nightly
MAINTAINER yanjy <yanjy@qq.com>

# 添加时区环境变量，亚洲，上海
ENV TimeZone=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TimeZone /etc/localtime && echo $TimeZone > /etc/timezone

ARG JAR_FILE
COPY ${JAR_FILE} app.jar
# 将变量SPRING_PROFILES_ACTIVE传入docker，运行镜像时传入该变量值
ENTRYPOINT ["java", "-jar","/app.jar"]